<script setup>
import { ref } from 'vue';
const props = defineProps({
  secondList: Object,
});
</script>

<template>
  <div class="classify-container">
    <div class="classify-warp">
      <div class="classify-title">全部分类</div>
      <div class="classify">
        <a
          v-for="item in props.secondList.children"
          :key="item.id"
          href="#"
          class="classify-a"
        >
          <div>
            <img :src="item.picture" alt="">
          </div>
          <div>茶咖酒具</div>
        </a>
      </div>
    </div>
  </div>
</template>

<style scope lang="scss">
.classify-container {
  width: 100%;
  background-color: #f5f5f4;

  .classify-warp {
    width: 1240px;
    margin: 30px auto;
    display: flex;
    height: 260px;
    background-color: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 30px;


  .classify-title {
    font-size: 30px;
    color: #666666;
    margin-bottom: 20px;
  }
  .classify {
    width: 160px;
    height: 140px;
    display: flex;
    width: 100%;


    .classify-a {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-decoration: none;
      color: #666666;
      width: 168px;
      height: 140px;
      font-size: 14px;
      margin-bottom: 20px;

      &:hover {
        color: #5bb79c;
      }

      div:nth-child(1) {
        width: 100px;
        height: 100px;

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }
    }
  }

}
}

</style>
